package org.lex.utils.tree;

public abstract class AbstractNode implements Node {
	private Object data = null;

	public AbstractNode(Object data) {
		this.data = data;
	}

	public Object getData() {
		return data;
	}

	public String toString() {
		if (0 == this.getChildCount())
			return String.valueOf(data);
		int count = this.getChildCount();
		return String.valueOf(data) + " [" + count + " children]";
	}
}
